package ldkxingzhe.ldkxingzhedemo.view;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.SearchView;
import android.widget.TextView;

import ldkxingzhe.ldkxingzhedemo.R;

/**
 * Created by xingzhe on 15/10/12.
 */
public class SearchViewActivity extends AppCompatActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_buttons);

        ((TextView)findViewById(R.id.title)).setText("测试SearchView");
        Button button = (Button)findViewById(R.id.button1);
        button.setText("searchView");
        LinearLayout layout = (LinearLayout)findViewById(R.id.linear_layout);
        SearchView searchView = new SearchView(this);
        layout.addView(searchView);
    }
}
